package com.state.demo2;

import com.state.demo2.impl.ForenoonState;

public class Work {

	// 当前时间
	private int hour;
	// 当前状态
	private State current;

	public Work() {
		// 初始状态
		current = new ForenoonState();
	}

	// 写程序
	public void writeProgram() {
		current.writeProgram(this);
	}

	public int getHour() {
		return hour;
	}

	public void setHour(int hour) {
		this.hour = hour;
	}

	public State getCurrent() {
		return current;
	}

	public void setCurrent(State current) {
		this.current = current;
	}

}
